package domain;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

/**
 * 
 * @author Bob
 * 
 */
public class User {
	private Integer id;
	private String registerName;
	private String password;
//	private String state;
	
	private Date operationDate;
	
	//注册时间 在數據庫端是設置為dateTime
	private Date registerDate;
	//登录时间
	private Date loginDate;
	private String email;

	//component
	private Address address;
	private UserInfomation userInfomation;
	
	private Set<UserRelation> relationUsers = new HashSet<UserRelation>(0);
	
	/**
	 * @return the id
	 */
	public Integer getId() {
		return id;
	}

	/**
	 * @param id
	 *            the id to set
	 */
	public void setId(Integer id) {
		this.id = id;
	}


	/**
	 * @return the address
	 */
	public Address getAddress() {
		return address;
	}

	/**
	 * @param address the address to set
	 */
	public void setAddress(Address address) {
		this.address = address;
	}

	/**
	 * @return the userInfomation
	 */
	public UserInfomation getUserInfomation() {
		return userInfomation;
	}

	/**
	 * @param userInfomation the userInfomation to set
	 */
	public void setUserInfomation(UserInfomation userInfomation) {
		this.userInfomation = userInfomation;
	}

	/**
	 * @return the registerDate
	 */
	public Date getRegisterDate() {
		return registerDate;
	}

	/**
	 * @param registerDate the registerDate to set
	 */
	public void setRegisterDate(Date registerDate) {
		this.registerDate = registerDate;
	}

	/**
	 * @return the loginDate
	 */
	public Date getLoginDate() {
		return loginDate;
	}

	/**
	 * @param loginDate the loginDate to set
	 */
	public void setLoginDate(Date loginDate) {
		this.loginDate = loginDate;
	}

	/**
	 * @return the registerName
	 */
	public String getRegisterName() {
		return registerName;
	}

	/**
	 * @param registerName the registerName to set
	 */
	public void setRegisterName(String registerName) {
		this.registerName = registerName;
	}

	/**
	 * @return the password
	 */
	public String getPassword() {
		return password;
	}

	/**
	 * @param password the password to set
	 */
	public void setPassword(String password) {
		this.password = password;
	}

	/**
	 * @return the email
	 */
	public String getEmail() {
		return email;
	}

	/**
	 * @param email the email to set
	 */
	public void setEmail(String email) {
		this.email = email;
	}

	/**
	 * @return the operationDate
	 */
	public Date getOperationDate() {
		return operationDate;
	}

	/**
	 * @param operationDate the operationDate to set
	 */
	public void setOperationDate(Date operationDate) {
		this.operationDate = operationDate;
	}

	/**
	 * @return the relationUsers
	 */
	public Set<UserRelation> getRelationUsers() {
		return relationUsers;
	}

	/**
	 * @param relationUsers the relationUsers to set
	 */
	public void setRelationUsers(Set<UserRelation> relationUsers) {
		this.relationUsers = relationUsers;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "User [id=" + id + ", registerName=" + registerName + ", password=" + password + ", operationDate="
			+ operationDate + ", registerDate=" + registerDate + ", loginDate=" + loginDate + ", email=" + email
			+ ", address=" + address + ", userInfomation=" + userInfomation + ", users=" + relationUsers + "]";
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */

}
